public class Admin extends User implements ILoginable {

    public Admin(String id, String username, String password, String phone) {
        super(id, username, password, phone);
    }

    @Override
    public boolean login(String username, String password) {
        return this.username.equals(username) && this.password.equals(password);
    }

    @Override
    public void resetPassword() {
        this.password = "123456";
        Logger.log("重置管理员密码：" + username);
    }

    @Override
    public String getType() {
        return "管理员";
    }
}
